Struct Option<T>
Component option type.
Assembly: WaaS.Core.dll
public readonly struct Option<T> : IEquatable<Option<T>>
Implements:
System.IEquatable<WaaS.ComponentModel.Binding.Option
1>`
Properties
None
View Source
public None? None { get; }
Some
View Source
public T? Some { get; }
Case
public Option<T>.VariantCase Case { get; }
Fields
NoneValue
View Source
public static readonly Option<T> NoneValue
Methods
Equals(Option<T>)
Indicates whether the current object is equal to another object of the same type.
View Source
public bool Equals(Option<T> other)
Returns
System.Boolean
: true if the current object is equal to the <code class="paramref">other</code> parameter; otherwise, false.
Parameters
Type | Name | Description |
---|---|---|
WaaS.ComponentModel.Binding.Option<T> | other | An object to compare with this object. |
Equals(object?)
Indicates whether this instance and a specified object are equal.
View Source
public override bool Equals(object? obj)
Returns
System.Boolean
: true if <code class="paramref">obj</code> and this instance are the same type and represent the same value; otherwise, false.
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare with the current instance. |
GetHashCode()
Returns the hash code for this instance.
View Source
public override int GetHashCode()
Returns
System.Int32
: A 32-bit signed integer that is the hash code for this instance.### CreateNone(None)
public static Option<T> CreateNone(None value)
Returns
WaaS.ComponentModel.Binding.Option<T>
Parameters
Type | Name |
---|---|
WaaS.ComponentModel.Binding.None | value |
CreateSome(T)
public static Option<T> CreateSome(T value)
Returns
WaaS.ComponentModel.Binding.Option<T>
Parameters
Type | Name |
---|---|
<T> | value |
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
System.String
: The fully qualified type name.
Implements
System.IEquatable<WaaS.ComponentModel.Binding.Option
1>`